import VueRouter from 'vue-router';

// 导入子组件 tabbar部分---
import homeContent from './compoents/tabbar/homeContent.vue';
import dingdongContent from './compoents/tabbar/dingdongContent.vue';
import speakContent from './compoents/tabbar/speakContent.vue';
import personContent from './compoents/tabbar/personContent.vue';

// 引入goodsInfo 子组件
import goodsInfo from './compoents/goods/goodsInfo.vue';

// 引入home页中的nav
import fqph from './compoents/home/fq.vue';
import by from './compoents/home/by.vue';
import banj from './compoents/home/banj.vue';
import zheshang from './compoents/home/zheshang.vue';
import jingX from './compoents/home/jingX.vue';


var router = new VueRouter({
    routes: [
        // 重定向回到首页 ----
        {
            path: '/',
            redirect: '/home'
        },
        // 回到home页面的路由
        {
            path: '/home',
            component: homeContent
        },
        // 回到叮咚抢的页面
        {
            path: '/dingdong',
            component: dingdongContent
        },
        // 回到speak部分 
        {
            path: '/speack',
            component: speakContent
        },
        // 回到个人中心
        {
            path: '/person',
            component: personContent
        },
        // 跳转商品详情---
        {
            path: '/goodsInfo/:id',
            component: goodsInfo
        },
        // 跳转疯抢排行  
        {
            path:'/fqph',
            component: fqph
        },
        // 九块九包邮
        {
            path:'/by',
            component:by
        },
        // 每日半价
        {
            path:'/banj',
            component:banj
        },
        // 折上折
        {
            path: '/zsz',
            component:zheshang
        },
        // 编辑精选
        {
            path:'/bjjx',
            component: jingX
        }
     




    ],
    linkActiveClass: 'mui-active'
});

// 将变量暴露出去
export default router;